const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 为了更好的让其他模块和组件能共享token数据，我们在store/getters.js中将token作为公共的属性访问
  token: state => state.user.token,
  // 若state中的userInfo值为null  读取userInfo的username就会报错
  // 不能给state里的userInfo的值设为null
  name:state=>state.user.userInfo.username,
  staffPhoto:state=>state.user.userInfo.staffPhoto
}
export default getters
